package com.hailiao.beidou.message.ui.page.splash

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.hailiao.beidou.message.ui.page.destinations.HomeScreenDestination
import com.hailiao.beidou.message.ui.page.destinations.SplashScreenDestination
import com.hailiao.beidou.message.utils.go
import kotlinx.coroutines.launch

/**
 * 启动页
 * @Author d10ng
 * @Date 2023/11/13 13:38
 */
class SplashScreenViewModel: ViewModel() {

    fun init() {
        viewModelScope.launch {
            go(HomeScreenDestination.route) {
                launchSingleTop = true
                popUpTo(SplashScreenDestination.route) {
                    inclusive = true
                }
            }
        }
    }
}